// pages/tabBar/order/index.js
import {
  list,find
} from '../../api/shop'

Page({

  /**
   * 页面的初始数据
   */
  data: {
    tabCur: 0, //默认选中
    tabs: [],
    title:"百家名店",
    tagId:""
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.info("推荐标签的信息",options)
    if(options.name){
      this.setData({
        title:options.name,
      })
    }
    if(options.tagId){
      this.setData({
        tagId:options.tagId,
      })
      this.selectComponent('#shopList').loadRecommendList(options.tagId);
    }
  },
  onReachBottom(){
    this.selectComponent('#shopList').onReachBottom();
  },
  onPullDownRefresh(){
    wx.showNavigationBarLoading()
    setTimeout(()=>{
      wx.hideNavigationBarLoading()
      this.selectComponent('#shopList').downRefresh();
    },500)
  },
})